<?php
include_once "header.php";


?>

<div id="container">
	<div id="maincont">
		<?php include_once "menu_samping.php"; ?>
		<div id="mainright">
			<div id="title">
			Surat Masuk > Hapus
			</div>
			<div id="body">
			<br>	
			
			<?php
			if (isset ($_GET["id"])){

	
				$daftar_sm = new Daftar_surat_masuk();

				if($daftar_sm->delete($_GET["id"])== true){
					header("Location:surat_masuk.php");
				} else {
					echo "Tidak dapat menghapus surat.";
					echo "<br>";
					echo "<br>";
					echo "<input type=\"button\" value=\"Kembali\" onClick=\"window.location.href='surat_masuk.php'\">";
					}
				

			}
			?>
					
			</div>
        </div>
	</div>
</div>
<?php
	include_once "footer.php";
?>

<script type="text/javascript">
	function del(){
	if(confirm('Apakah Anda yakin akan menghapus surat ini?'))
	return true;
	else return false
	}
</script>
